<HTML dir="ltr">
	<HEAD>
		<TITLE>'3ds max Plugin Wizard'</TITLE>
		<META content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<LINK ID="LINKURL" REL="stylesheet" HREF="../../1033/styles.css">
		<STYLE type="text/css">@import url(); 
		</STYLE>
		<!--  -->
		<!-- The SYMBOL tag is used to set the default values for the user-defined symbols.-->
		<!--  -->
		<!-- These are 3ds max Wizard specific symbols --><SYMBOL VALUE="" TYPE="text" NAME="CLASSNAME_TEXTBOX"></SYMBOL><SYMBOL VALUE="" TYPE="select-one" NAME="BASECLASS_LISTBOX"></SYMBOL><SYMBOL VALUE="" TYPE="text" NAME="PLUGCAT_TEXTBOX"></SYMBOL><SYMBOL VALUE="" TYPE="text" NAME="PLUGDESC_TEXTBOX"></SYMBOL></HEAD>
	<BODY onkeypress="OnPress();" onkeydown="OnKey();" bottomMargin="0" bgColor="buttonface" leftMargin="0" topMargin="0" onload="InitDocument(document);" rightMargin="0">
		<TABLE class="ONE" height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
			<COLGROUP>
				<COL width="178">
				<COL>
				<!--OPEN OF INTRODUCTORY INFORMATION TABLE//-->
				<TR vAlign="top">
					<TD width="100%" colSpan="2" height="79">
						<TABLE class="TWO" id="Table2" cellSpacing="0" cellPadding="0" border="0">
							<COLGROUP>
								<COL width="12">
								<COL>
								<COL width="12">
								<TR>
									<TD vAlign="top" width="12" height="12">&nbsp;
									</TD>
									<TD vAlign="top" height="12">&nbsp;
									</TD>
									<TD vAlign="top" width="12" height="12">&nbsp;
									</TD>
									<TD class="IMAGE" vAlign="bottom" width="110" rowSpan="2">
										<DIV class="SMALLA" id="Layer0"><IMG class="SMALLEST" height="63" alt="" src="..\..\Images\3dsmaxPluginWizard.gif" width="63" border="0">
										</DIV>
									</TD>
									<TD vAlign="top" width="6" height="12" rowSpan="2">&nbsp;
									</TD>
								</TR>
								<TR>
									<TD vAlign="top" width="12" height="65">&nbsp;
									</TD>
									<TD vAlign="top" height="65">
										<H4 class="HEAD" id="HEAD">Welcome to the 3ds max Plugin Wizard.</H4>
										<P class="SUBHEAD" id="SUBHEAD">Please complete the&nbsp;plugin details&nbsp;below 
											and click&nbsp;Project&nbsp;Details&nbsp;to proceed.</P>
									</TD>
									<TD vAlign="top" width="12" height="65">&nbsp;
									</TD>
								</TR>
								<TR>
									<TD class="RULE" vAlign="top" colSpan="5" height="2">
										<TABLE id="Table3" height="1" cellSpacing="0" cellPadding="0" width="100%" border="0">
											<TR vAlign="top">
												<TD width="100%" bgColor="buttonshadow" height="1"><IMG height="1" alt="" src="../../Images/spacer.gif" width="1"></TD>
												<TD width="1" bgColor="window" height="1"><IMG height="1" alt="" src="../../Images/spacer.gif" width="1"></TD>
											</TR>
										</TABLE>
									</TD>
								</TR>
						</TABLE>
					</TD>
				</TR>
				<!--CLOSE OF INTRODUCTORY INFORMATION TABLE//-->
				<!--OPEN OF NAVIGATION, CONTENT, AND BUTTON TABLES//-->
				<TR vAlign="top">
					<TD class="THREE" style="BACKGROUND-IMAGE: url(..\..\Images\3dsmaxPluginWizard_BG.gif)" vAlign="top" width="178" height="100%">
						<!--OPEN OF NAVIGATION TABLE//-->
						<TABLE class="THREE" cellSpacing="0" cellPadding="0" border="0">
							<COLGROUP>
								<COL width="12">
								<COL width="166">
								<COL width="1">
								<TR>
									<TD vAlign="top" colSpan="3" height="12">&nbsp;
									</TD>
								</TR>
								<TR>
									<TD vAlign="top" width="12" height="100%">&nbsp;
									</TD>
									<TD vAlign="top" width="165" height="100%">
										<!--OPEN OF NAVIGATIONAL LINKS//-->
										<DIV class="LINK">
											<TABLE class="LINKTEXT" height="28" cellSpacing="0" cellPadding="0" width="166" border="0">
												<TR vAlign="center">
													<TD width="162"><SPAN class="ACTIVELINK" id="Default" title="" onclick="Next(document, 'default.htm');" tabIndex="1"><font color="#eeeeee">Plugin 
																Type</font></SPAN>
													</TD>
													<TD width="4"><IMG height="1" src="../../Images/spacer.gif" width="4">
													</TD>
												</TR>
											</TABLE>
										</DIV>
										<DIV class="LINKSELECTED"><SPAN class="VERTLINE1"><IMG height="1" alt="" src="../../Images/spacer.gif" width="1" border="0">
											</SPAN><SPAN class="HORILINE1">
												<TABLE height="100%" cellSpacing="0" cellPadding="0" width="167" border="0">
													<TR vAlign="top">
														<TD class="DOTTEDLINE" height="1"></TD>
													</TR>
													<TR vAlign="top">
														<TD height="100%"><IMG height="28" alt="" src="../../Images/spacer.gif" width="1" border="0">
														</TD>
													</TR>
													<TR vAlign="top">
														<TD class="DOTTEDLINE" height="1"></TD>
													</TR>
												</TABLE>
											</SPAN>
											<TABLE class="LINKTEXT" height="28" cellSpacing="0" cellPadding="0" width="160" border="0">
												<TR vAlign="center">
													<TD width="162">
														<B>
															<SPAN id="Page_2" title="" onclick="Next(document, 'Page_2.htm');" tabIndex="1">Plugin Details
															</SPAN>
														</B>
													</TD>
													<TD width="4"><IMG height="1" src="../../Images/spacer.gif" width="4">
													</TD>
												</TR>
											</TABLE>
										</DIV>
										<DIV class="LINK">
											<TABLE class="LINKTEXT" height="28" cellSpacing="0" cellPadding="0" width="166" border="0">
												<TR vAlign="center">
													<TD width="162"><SPAN class="ACTIVELINK" id="Page_3" title="" onclick="Next(document, 'Page_3.htm');" tabIndex="1"><font color="#eeeeee">Project 
																Details</font></SPAN>
													</TD>
													<TD WIDTH="4"><IMG height="1" src="../../Images/spacer.gif" width="4">
													</TD>
												</TR>
											</TABLE>
										</DIV>
										<!--CLOSE OF NAVIGATIONAL LINKS//--></TD>
									<TD width="1">
										<DIV CLASS="VERTLINE"><IMG height="1" alt="" src="../../Images/spacer.gif" width="1" border="0">
										</DIV>
									</TD>
								</TR>
						</TABLE>
						<!--CLOSE OF NAVIGATION TABLE//--></TD>
					<TD vAlign="top" height="100%">
						<!--OPEN OF CONTENT AND BUTTON TABLE//-->
						<TABLE class="ONE" cellSpacing="0" cellPadding="0" border="0">
							<COLGROUP>
								<COL width="100%">
								<TR VALIGN="top">
									<TD height="100%">
										<!--OPEN OF CONTENT//-->
										<TABLE class="CONTENT" id="Table1" cellSpacing="0" cellPadding="0" border="0">
											<COLGROUP>
												<COL width="12">
												<COL width="185">
												<COL width="12">
												<COL width="185">
												<COL width="12">
												<COL width="185">
												<COL width="12">
												<TR>
													<TD vAlign="top" colSpan="5" height="12">&nbsp;
													</TD>
												</TR>
												<TR vAlign="top">
													<TD vAlign="top" width="12">&nbsp;
													</TD>
													<TD style="WIDTH: 265px" vAlign="top" colSpan="3">
														<P class="ElementSpacer">&nbsp;</P>
														<SPAN class="itemText">Please enter&nbsp;your plugin class name: <INPUT id="CLASSNAME_TEXTBOX" style="WIDTH: 200px" type="text" size="30" name="CLASSNAME_TEXTBOX"><BR>
															<BR>
															Please select&nbsp;a base class:<BR>
															<SELECT id="BASECLASS_LISTBOX" style="WIDTH: 200px" name="BASECLASS_LISTBOX">
															</SELECT><BR>
															<BR>
															Please enter a plugin category:<BR>
															<INPUT id="PLUGCAT_TEXTBOX" style="WIDTH: 200px" type="text" size="30" name="PLUGCAT_TEXTBOX"><BR>
															<BR>
															Please enter a plugin description:<BR>
															<INPUT id="PLUGDESC_TEXTBOX" style="WIDTH: 200px" type="text" size="30" name="PLUGDESC_TEXTBOX"><BR>
														</SPAN>
													</TD>
													<TD vAlign="top" width="12">&nbsp;
													</TD>
												</TR>
												<TR>
													<TD vAlign="top" colSpan="7" height="100%">&nbsp;
													</TD>
												</TR>
										</TABLE>
										<!--CLOSE OF CONTENT//--></TD>
								</TR>
								<TR VALIGN="bottom">
									<TD height="48">
										<!--OPEN OF BUTTON HTML//-->
										<TABLE height="48" cellSpacing="0" cellPadding="0" border="0">
											<COLGROUP>
												<COL width="12">
												<COL>
												<COL width="75">
												<COL width="4">
												<COL width="75">
												<COL width="4">
												<COL width="75">
												<COL width="12">
												<TR>
													<TD class="RULE" vAlign="top" colSpan="8" height="2">
														<TABLE height="1" cellSpacing="0" cellPadding="0" width="100%" border="0">
															<TR vAlign="top">
																<TD width="100%" bgColor="buttonshadow" height="1"><IMG height="1" alt="" src="../../Images/spacer.gif" width="1"></TD>
																<TD width="1" bgColor="window" height="1"><IMG height="1" alt="" src="../../Images/spacer.gif" width="1"></TD>
															</TR>
														</TABLE>
													</TD>
												</TR>
												<TR>
													<TD vAlign="top" colSpan="8" height="11">&nbsp;
													</TD>
												</TR>
												<TR>
													<TD vAlign="center" width="12" height="23">&nbsp;
													</TD>
													<TD vAlign="top" height="23">&nbsp;
													</TD>
													<TD vAlign="center" width="75" height="23">&nbsp;
													</TD>
													<TD vAlign="center" width="4" height="23">&nbsp;
													</TD>
													<TD vAlign="center" width="75" height="23"><BUTTON class="BUTTONS" id="CancelBtn" accessKey="C" onclick="window.external.Finish(document, 'cancel');" type="button"><U>C</U>ancel</BUTTON>
													</TD>
													<TD vAlign="center" width="4" height="23">&nbsp;
													</TD>
													<TD vAlign="center" width="75" height="23"><BUTTON class="BUTTONS" id="HelpBtn" accessKey="H" onclick="window.external.OnHelp('vc.appwiz.custom.overview');" type="button"><U>H</U>elp</BUTTON>
													</TD>
													<TD vAlign="center" width="12" height="23">&nbsp;
													</TD>
												</TR>
												<TR>
													<TD VALIGN="top" HEIGHT="12" COLSPAN="8">
														&nbsp;
													</TD>
												</TR>
										</TABLE>
										<!--CLOSE OF BUTTON HTML//--></TD>
								</TR>
						</TABLE>
						<!--CLOSE OF NAVIGATION, CONTENT, AND BUTTON TABLES//--></TD>
				</TR>
		</TABLE>
	</BODY>
</HTML>
		<SCRIPT language="JSCRIPT">

var tab_array = new Array();
tab_array[0] = Default;
tab_array[1] = Page_2;
tab_array[2] = Page_3;


function PopulateFields()
{
	// Populate base class list
	var baseArray = new Array();
	baseArray[0] = window.external.FindSymbol("BASECLASS_1");
	baseArray[1] = window.external.FindSymbol("BASECLASS_2");
	
	for (var i =0; i < baseArray.length; i++)
	{
		if (baseArray[i] != '')
		{
			var oOption		= document.createElement("OPTION");
			oOption.text	= baseArray[i];
			oOption.value	= baseArray[i];
			BASECLASS_LISTBOX.add(oOption);
		}
	}
	
	// Also adding project name as default class name
	var projectName	= new String();
	var className	= new String();
	
	projectName = window.external.FindSymbol("PROJECT_NAME");
	className	= projectName.replace(/ /g, "_");
	
	CLASSNAME_TEXTBOX.value = className;
}

// This is an example of a function which initializes the page
//
function InitDocument(document)
{
	PopulateFields();
	setDirection();
	
	if (window.external.FindSymbol('DOCUMENT_FIRST_LOAD'))
	{
		// This function sets the default symbols based 
		// on the values specified in the SYMBOL tags above
		//
		window.external.SetDefaults(document);
	}

	// Load the document and initialize the controls 
	// with the appropriate symbol values
	//
	window.external.Load(document);
}

// Returns a random hexadecimal number in string form, such as "0x1234"
function GenRandom()
{
	// Slapped together random num gen.
	var randomNum = Math.random()*0.1 + Math.random()*0.2 + Math.random()*0.3 + Math.random()*0.4;
	randomNum = randomNum.toString(16);
	randomNum = "0x" + randomNum.substring(2,10);
	return randomNum
}

// If the wizard has more than 1 page, this 
// function will browse to the page specified
//
function Next(document, linkto)
{
	var canProgress = true;
	var className	= '';
	var baseClass	= '';
	
	if(CLASSNAME_TEXTBOX.value != null)
	{
		if (CLASSNAME_TEXTBOX.value == "")
		{
			window.external.ReportError("Please enter a class name for your plugin.");
			canProgress = false;
		}
	}
	else
	{
		canProgress = false;
	}
	
	if (canProgress)
	{
		className = CLASSNAME_TEXTBOX.value;
		baseClass = BASECLASS_LISTBOX.value;
	
		var nClassID1		= GenRandom(); //random hexadecimal number, as a string
		var nClassID2		= GenRandom(); //random hexadecimal number, as a string
		
		var nExtClassID1	= GenRandom(); //random hexadecimal number, as a string
		var nExtClassID2	= GenRandom(); //random hexadecimal number, as a string
		
		var warpClassID1	= GenRandom(); //random hexadecimal number, as a string
		var warpClassID2	= GenRandom(); //random hexadecimal number, as a string
	
		var classNameUpper	= className.toUpperCase();
		var classNameLower	= className.toLowerCase();
		
		window.external.AddSymbol("CLASS_NAME",	className);
		window.external.AddSymbol("CLASS_NAME_UPPER", classNameUpper);
		window.external.AddSymbol("CLASS_NAME_LOWER", classNameLower);
		window.external.AddSymbol("SUPER_CLASS_NAME", baseClass);
		
		window.external.AddSymbol("EXTCLASSID1", nExtClassID1);
		window.external.AddSymbol("EXTCLASSID2", nExtClassID2);
		
		window.external.AddSymbol("CLASSID1", nClassID1);
		window.external.AddSymbol("CLASSID2", nClassID2);
		
		window.external.AddSymbol("WARPID1", warpClassID1);
		window.external.AddSymbol("WARPID2", warpClassID2);

		window.external.AddSymbol("CATEGORY", PLUGCAT_TEXTBOX.value);
		window.external.AddSymbol("LIBDESC",  PLUGDESC_TEXTBOX.value);
	
		window.external.RemoveSymbol("SIMPLE_TYPE");
		window.external.RemoveSymbol("SIMPLE_MANIP");

		if( baseClass == "GenCamera"	  ||
			baseClass == "StdControl"	  ||
			baseClass == "ConstObject"	  ||
			baseClass == "GenLight"		  ||
			baseClass == "SimpleMod2"	  ||
			baseClass == "SimpleParticle" ||
			baseClass == "SimpleObject2"  ||
			baseClass == "SimpleSpline"   ||
			baseClass == "SimpleShape"    ||
			baseClass == "SimpleWSMMod")
			window.external.AddSymbol("SIMPLE_TYPE", true);
	
		if(baseClass == "SimpleManipulator")
		{
			window.external.AddSymbol("SIMPLE_MANIP", true);
		}
	}
	if (canProgress) window.external.Next(document, linkto);
}

// This is an example of a function which
// gets called when the user clicks on 'Finish'
//
function OnFinish(document)
{
	OnWizFinish(document);
}

		</SCRIPT>
		<SCRIPT ID="INCLUDE_SCRIPT" LANGUAGE="JSCRIPT"></SCRIPT>
		<SCRIPT language="JSCRIPT" id="INCLUDE_COMMON"></SCRIPT>
		<!-- 
Common.js is a script file which contains the helper functions 
used by the wizards.  Include this line if you want to
call these functions from your html scripts.
//-->
<SCRIPT>
	var strPath = window.external.FindSymbol("PRODUCT_INSTALLATION_DIR");
	strPath += "VCWizards/";
	strPath += window.external.GetHostLocale();
	var strScriptPath = strPath + "/Script.js";
	var strCommonPath = strPath + "/Common.js";
	document.scripts("INCLUDE_SCRIPT").src = strScriptPath;
	document.scripts("INCLUDE_COMMON").src = strCommonPath;
</SCRIPT>
